<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		div.father{
			/*position: absolute;*/
			width:200px;
			height:500px;
			/*top:50%;
			left:50%;*/
			/*margin-top:-250px;*/
			background: #aaf;
		}
		 div.son{
			height: 500px;
			width:200px;
			background: #c00;
		} 
	/* 	div.son2{
		position: absolute;
		top: 200px;
		height: 200px;
		width:200px;
		background: #ffa;
	} */
		/* .grandSon{
			position: absolute;
			height: 100px;
			width:100px;
			background: pink;
		} */
	</style>
	<script src="./project/home/public/js/jquery.min.js"></script>
</head>
<body>
	<div class="father">
		<div class="son"></div>
	</div>
</body>
<script>
	$('.son').offset({'top':'200','left':'200'});
	/*var dx=$('.son1').position();
	alert('son1 的x坐标是:'+dx.left);
	alert('son1 的y坐标是:'+dx.top);*/
	alert($('.father').offset().top);	//8和8，这是body标签的默认外边距
	alert($('.father').offset().left);
	alert($('.son').offset().top);
	alert($('.son').offset().left);
</script>
</html>